<?php

$cities = $act->getCities();
//echo '<pre>'; print_r($months);
$months = array(
    array('title' => 'sty-11', 'id' => '2011-01'),
    array('title' => 'lut-11', 'id' => '2011-02'),
    array('title' => 'mar-11', 'id' => '2011-03'),
    array('title' => 'kwi-11', 'id' => '2011-04'),
);
$months = $act->createMonthsArr($from, $to);

$cityUser = array(
    array('userName' => 'Jan Kowalski','userId' => '1', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8',),
    array('userName' => 'Adam Kowalski','userId' => '2', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8',),
    array('userName' => 'Jan Kowalski','userId' => '1', 'city_id' => 'baeb9480-b17a-eba6-6c16-4d8505b1dd19',),
    array('userName' => 'Stefan Kowalski','userId' => '3', 'city_id' => 'b1d10463-0f22-b247-b4df-4d7291aa0450',),
    array('userName' => 'Anka Kowalski','userId' => '4', 'city_id' => '72db5155-9722-7c85-0d00-4d769053a2c6',),
    array('userName' => 'Greg Kowalski','userId' => '5', 'city_id' => 'baeb9480-b17a-eba6-6c16-4d8505b1dd19',)
);
$cityUser = $act->getUserCities();

//$callsData = $act->getUserCallsData($from, $to);
//$meetingsData = $act->getUserMeetingsData($from, $to);
$data = array(
    array('userId' => '1', 'city_id' => 'baeb9480-b17a-eba6-6c16-4d8505b1dd19', 'yearMonth'=>'2011-01', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
    array('userId' => '1', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-01', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
    array('userId' => '1', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-03', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
    array('userId' => '1', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-04', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
    array('userId' => '1', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-02', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
    array('userId' => '2', 'city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-01', 'm' => 3, 'c' => 2, 'mc' =>5, 'o'=>1),
    array('userId' => '3', 'city_id' => 'b1d10463-0f22-b247-b4df-4d7291aa0450', 'yearMonth'=>'2011-01', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
);
$data = $act->createData($from, $to);
//echo '<pre>'; print_r($data);

$cityData = array(
   array('city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-01', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
   array('city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-02', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
   array('city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-03', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),
   array('city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'yearMonth'=>'2011-04', 'm' => 1, 'c' => 2, 'mc' =>3, 'o'=>1),

);
$cityData = $act->getCitySummaryData();
$citySumData = $act->getCitySummarySum();

$summaryData = array(
    array('yearMonth'=>'2011-01', 'm' => 10, 'c' => 20, 'mc' =>30, 'o'=>10),
    array('yearMonth'=>'2011-02', 'm' => 11, 'c' => 21, 'mc' =>31, 'o'=>11),
    array('yearMonth'=>'2011-03', 'm' => 10, 'c' => 20, 'mc' =>30, 'o'=>10),
    array('yearMonth'=>'2011-04', 'm' => 11, 'c' => 21, 'mc' =>31, 'o'=>11),
);
$summaryData = $act->getMonthData();

$userSummaryData = array(
  array('city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'userId' => '1', 'mc'=>40, 'o'=>13),
  //array('city_id' => '528b92d1-d3d2-aaa4-2994-4d72720aa2b8', 'userId' => '2', 'mc'=>40, 'o'=>13),
);
$userSummaryData = $act->getUserCitySummaryData();


//echo '<pre>';print_r($citySumData);
$smarty->assign('cities', $cities);
$smarty->assign('months', $months);
$smarty->assign('cityUser', $cityUser);
$smarty->assign('data', $data);
$smarty->assign('cityData', $cityData);
$smarty->assign('citySumData', $citySumData);
$smarty->assign('summaryData', $summaryData);
$smarty->assign('userSummaryData', $userSummaryData);
$smarty->assign('allMC', $act->allMC);
$smarty->assign('allO', $act->allO);
$smarty->assign('collspan', $act->collspan * 4 + 3);


echo $smarty->fetch('modules/Dashboard/activities_city.tpl');